<?php
class Application_Model_checkip extends Application_Model_DomainObject{
        protected $_id;//序号
        protected $_ip;//序号
        public static function  getbyip($country){        
            $getItem=new Application_Model_DbTable_checkip();
            $jip=$getItem->getbyip($country);
            $t=false;
            foreach ($jip as $jipkey => $jipvalue) {
                 if($jipvalue->ip==$_SERVER["REMOTE_ADDR"]){
                    return true;
                 }
            }
            if(!$t){
                //exit('未添加白名单,请联系管理员');
            }
        }
}